package com.prs.crm.dao.oa.impl;

import java.util.Collection;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.oa.MyMailListDao;
import com.prs.crm.domain.oa.Apply;
import com.prs.crm.domain.oa.MyMailList;
import com.prs.crm.domain.oa.MyMailListType;

public class MyMailListDaoImpl extends BaseDaoImpl<MyMailList> implements MyMailListDao{

	@Override
	public Collection<MyMailList> getMyMailListByType(MyMailListType type) {
		// TODO Auto-generated method stub
		Criteria criteria = this.getSession().createCriteria(MyMailList.class);
		criteria.add(Restrictions.eq("type", type));
		Collection<MyMailList> list = criteria.list();
		return list;
	}

}
